print banner in python

40

import os

def print_banner(title=""):
    os.system('cls')
    print("""
    BANNER GOES HERE!!!
""")
    total_len = 80
    if title:
        padding = total_len - len(title) - 4
        print("== {} {}\n".format(title, "=" * padding))
    else:
        print("{}\n".format("=" * total_len))

Comments

Submit
0 Comments